menubar: Only query ipadding when we actually need it
authorBenjamin Otte <otte@redhat.com>
Sun, 1 May 2011 03:38:47 +0000 (05:38 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 1 May 2011 03:38:47 +0000 (05:38 +0200)
gtk/gtkmenubar.c

index a50a25c6f301fe7596910fef19a59388483b7c9d..de2ef8f5ea776c3c91f68e8af4398af5b3da7a21 100644 (file)
@@ -487,10 +487,10 @@ gtk_menu_bar_size_allocate (GtkWidget     *widget,
                            allocation->x, allocation->y,
                            allocation->width, allocation->height);
 
-  gtk_widget_style_get (widget, "internal-padding", &ipadding, NULL);
-  
   if (menu_shell->priv->children)
     {
+      gtk_widget_style_get (widget, "internal-padding", &ipadding, NULL);
+  
       border_width = gtk_container_get_border_width (GTK_CONTAINER (menu_bar));
       child_allocation.x = (border_width +
                            ipadding +